﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using DevExpress.XtraEditors;

namespace TMIS
{
    public partial class frmTopicsStatistics : XtraForm
    {
        private BLL.TopicsStatistics bll = new BLL.TopicsStatistics();
        public frmTopicsStatistics()
        {
            InitializeComponent();
            comProfession.Properties.Items.AddRange(bll.GetProfession());
        }

        private void frmTopicsStatistics_Load(object sender, EventArgs e)
        {
        }

        private void btnSearch_Click(object sender, EventArgs e)
        {
            this.topicsStatisticsTableAdapter.Fill(this.reportDS.TopicsStatistics, bll.GetProfessionID(comProfession.Text), bll.GetGradeID(comGrade.Text));
            this.reportViewer.RefreshReport();
        }

        private void comProfession_SelectedValueChanged(object sender, EventArgs e)
        {
            comGrade.Properties.Items.Clear();
            comGrade.Properties.Items.AddRange(bll.GetGrade(bll.GetProfessionID(comProfession.Text)));
        }
    }
}
